<template>
  <div>
    <custom-form
      :columns="columns"
      :rules="rules"
      v-bind="$attrs"
      v-on="listeners"
    >
    </custom-form>
  </div>

</template>

<script>
import customFromMixin from '@/utils/mixin/custom-form'
// import { type } from 'os'

export default {
  name: 'AddForm',
  mixins: [customFromMixin],
  data() {
    return {
      rules: {},
      // 列配置
      columns: [
        { name: '小区', field: 'housing_id', opts: { control: 'housing', required: true, field: 'id', name: 'name' }, type: 'select_table' },
        // { name: '名称', field: 'housing.name', opts: { maxlength: 50, disable: true } },
        { name: '楼号', field: 'building_number', opts: { required: true, maxlength: 10 } }
        // { name: '性别', type: 'radio', field: 'sex', list: ['是', '否'], opts: { required: true, maxlength: 50 }, value: 1 }
        // { name: '性别', type: 'radio', field: 'sex', label: true, opts: { required: true, maxlength: 50 }, value: 1 },
        // { name: '下拉框', type: 'select', field: 'select', list: ['广东', '汕头', '潮阳'] }
        // { name: '下拉框', type: 'select', field: 'type', label: true }
        // { name: '图片', field: 'image', opts: { required: true, maxlength: 255 }, type: 'upload_image' },
        // {
        //   name: '图片',
        //   field: 'image',
        //   opts: { required: true, control: 'attachment', name: 'link', pk: 'url', query: { category: 'image' }, format: 'image' },
        //   type: 'select_table'
        // },
        // { name: '链接', field: 'link', opts: { required: true, maxlength: 255 } },
        // { name: '状态', field: 'status', label: true, type: 'radio', opts: { required: true } }
      ]
    }
  },
  watch: {},
  methods: {}
}
</script>

<style scoped>

</style>
